package com.centaline.androidsalesblog.api.usercenter;

import com.android.volley.Request;
import com.centaline.androidsalesblog.api.UserCenterApi;
import com.centaline.androidsalesblog.constants.AppConstant;
import com.centaline.androidsalesblog.constants.AppNameType;
import com.centaline.androidsalesblog.model.responseobject.SimpleUserCenterRo;
import com.centanet.framework.interfaces.IResponseListener;

/**
 * 添加约看
 * Created by guilin on 16/3/23.
 */
public class AddReservationApi extends UserCenterApi<SimpleUserCenterRo> {

    private String estateCode;
    private String estateName;
    private String postId;

    public AddReservationApi(Class<?> tag, Class<SimpleUserCenterRo> aClass, IResponseListener<SimpleUserCenterRo> iResponseListener) {
        super(tag, aClass, iResponseListener);
    }

    public void setEstateCode(String estateCode) {
        this.estateCode = estateCode;
    }

    public void setEstateName(String estateName) {
        this.estateName = estateName;
    }

    public void setPostId(String postId) {
        this.postId = postId;
    }

    @Override
    protected int getMethod() {
        return Request.Method.POST;
    }

    @Override
    protected void setParams() {
        putParams("UserId", AppConstant.UserId);
        putParams("CityCode", AppConstant.CityCode);
        putParams("Source", sourceType.getSource());
        putParams("AppName", AppNameType.ESF.getAppName());
        putParams("EstateCode", estateCode);
        putParams("estateName", estateName);
        putParams("PostID", postId);
    }

    @Override
    protected String getPath() {
        return "InsertReservationRequest";
    }
}
